package com.example.demo01

import android.os.Bundle
import android.widget.ImageView
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.bumptech.glide.Glide

class ImageViewActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_image_view)
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
            val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
            insets
        }

        val img = findViewById<ImageView>(R.id.img3)
        Glide.with(this)
            .load("https://tse3-mm.cn.bing.net/th/id/OIP-C.z2PylNZUxOygR-as4ZcPuAHaLR?w=208&h=306&c=7&r=0&o=7&dpr=1.3&pid=1.7&rm=3")
            .into(img)
    }
}